import unittest

from lib.HTMLTestRunner_PY3 import HTMLTestRunner

if __name__ == '__main__':
    # 1. 套件
    suite = unittest.TestLoader().discover('./script', 'test*')
    # 2. 打开文件
    with open('./report/ihrm登陆测试报告.html', 'wb') as f:
        # 3. 报告对象
        runner = HTMLTestRunner(f, verbosity=2)
        # 4. 执行套件
        runner.run(suite)